% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/explore_startparams.r
\name{explore_startparams}
\alias{explore_startparams}
\title{Function to explore starting value parameter space}
\usage{
explore_startparams(
  space,
  startsr,
  dev,
  func,
  catch,
  choice,
  distance,
  otherdat,
  changevec
)
}
\arguments{
\item{space}{Number of starting value permutations to test (the size of
the space to explore). The greater the dev parameter the larger the
space parameter should be.}

\item{startsr}{Average starting value parameters for
revenue/location-specific covariates then cost/distance. The best
guess at what the starting value parameters should be (e.g. all
ones). Should correspond to the likelihood and data that you want to
test.}

\item{dev}{How far to deviate from the average parameter values when
exploring (random normal deviates). The less certain the average
parameters are, the greater the dev parameter should be.}

\item{func}{Name of likelihood function to test.}

\item{catch}{Data corresponding to actual zonal choice.}

\item{choice}{Data corresponding to actual catch.}

\item{distance}{Data corresponding to distance.}

\item{otherdat}{Other data (as a list, corresponding to the likelihood
function you want to test.)}

\item{changevec}{Which params to change (equals 1).}
}
\value{
newstart: Chosen starting values with smallest likelihood \cr
saveLLstarts: Likelihood values for each starting value permutation \cr
savestarts: Starting value permuations (corresponding to each saved
    likelihood value) \cr
}
\description{
Shotgun method to find better starting values by exploring starting value
     parameter space
}
\examples{
data(zi)
data(catch)
data(choice)
data(distance)
data(si)
data(prices)

space <- 15
startsr <- rep(1,7)
dev <- 3
func <- epm_normal

otherdat <- list(griddat=list(si=as.matrix(cbind(si,si,si,si))),
    intdat=list(zi=as.matrix(zi)),
    pricedat=list(prices=as.matrix(prices)))

explore_startparams(space,startsr,dev,func,catch,choice,distance,
    otherdat)

startsr <- c(0.5, 0.4, 0.3, 0.2, -0.4, 2, 1)
explore_startparams(space,startsr,dev,func,catch,choice,distance,
    otherdat)

space <- 100
dev <- 1

results <- explore_startparams(space,startsr,dev,func,catch,choice,
    distance,otherdat)
results$newstart
min(unlist(results$saveLLstarts))
match(min(unlist(results$saveLLstarts)),unlist(results$saveLLstarts))

}
